]> dgit.raspbian.org Git - gnome-shell.git/commit
NetworkAgent: handle empty hints and VPN secrets correctly
authorDan Williams <dcbw@redhat.com>
Wed, 4 Dec 2013 04:07:16 +0000 (22:07 -0600)
committerDan Williams <dcbw@redhat.com>
Fri, 13 Dec 2013 22:23:24 +0000 (16:23 -0600)
commit17726abb0a42b7b103f58de5de00ed5e8c3a58d8
tree4d2ac7d3e9494dc657010e10b2a1f3468a611bc6
parent01f740ce69017f6305dd579c2eab55f0076ca6f6
NetworkAgent: handle empty hints and VPN secrets correctly

get_secrets_keyring_cb() contained an optimization (copied over from
nm-applet) that avoided a D-Bus round-trip when NetworkManager sent
secrets hints that were not satisified by the user.  This code did
not properly handle empty hints though, and proceeded to always
request new secrets whenever empty hints were sent.  Remove this
code entirely since the complexity is not worth it (per Jasper).

Second, get_secrets_keyring_cb() was mishandling VPN secrets which
were marked as "always ask".  Because the VPN secrets are not GObject
properties because they cannot be pre-defined, they are passed in
a hash table that is a GObject property marked 'secret'.  Unfortunately,
that means that the shell agent cannot determine their secret flags.
But since the VPN plugin auth dialogs have much better information
about what's required than the shell agent does, always ask the VPN
auth dialogs to handle the secrets requests after grabbing any that
already exist from the keyring.  This is also what nm-applet does.

https://bugzilla.gnome.org/show_bug.cgi?id=719815
src/shell-network-agent.c